#define _CRT_SECURE_NO_WARNINGS  1

#include"Stack.h"
#include"Queue.h"


void Test_Stack()
{
	ST s;
	STInit(&s);
	STPush(&s, 1);
	STPush(&s, 2);
	STPush(&s, 3);
	STPush(&s, 100);
	STPush(&s, 5);
	STPush(&s, 6);
	STPush(&s, 7);
	STPush(&s, 8);

	STPop(&s);
	STPop(&s);
	STPop(&s);
	STPop(&s);


	STDataType top = STTop(&s);

	if (!STEmpty(&s))
		printf("size: %d,top: %d", STSize(&s), top);

	STDestroy(&s);
}

void Test_Queue()
{
	Queue q;
	QueueInit(&q);
	QueuePush(&q, 1);
	QueuePush(&q, 3);
	QueuePush(&q, 5);
	QueuePush(&q, 7);
	QueuePush(&q, 9);
	QueuePush(&q, 11);
	QueuePush(&q, 13);
	QueuePush(&q, 15);
	QueuePush(&q, 17);
	QueuePush(&q, 19);

	
	QueuePop(&q);
	QueuePop(&q);
	QueuePop(&q);
	QueuePop(&q);
	QueuePop(&q);


	if(!QueueEmpty(&q))
		printf("QueueSize: %d,front: %d,back: %d", QueueSize(&q), QueueFront(&q), QueueBack(&q));

}

int main()
{
	//Test_Stack();
	Test_Queue();

	return 0;
}